<?php
    header('Content-Type: text/event-stream');
    header('Cache-Control: no-cache');
    
    echo "data: ";
    exec("bash /root/peer/peer.sh -Path /root/go/src/github.com/hyperledger/fabric/fabric-samples/bin/ -getCI 2>&1", $output, $ret);
    for ($x = 0; $x < count($output); $x++)
        echo str_replace(array("\r\n", "\r", "\n"), "", $output[$x]);

    echo "\n\n";

    flush();
?>